home *** CD-ROM | disk | FTP | other *** search
/ Die Ultimative Software-P…i Collection 1996 & 1997 / Die Ultimative Software-Pakete CD-ROM fur Atari Collection 1996 & 1997.iso / tt / cal45 / cal45.doc next >
Encoding:
Text File  |  1996-09-18  |  17.7 KB  |  337 lines

  1.                          Cal: The Calendar Program v4.5
  2.                         Copyright (c)1991 by Bill Aycock
  3.  
  4.  
  5. Ever forgotten your anniversary or your kid's birthday? Missed a TV show
  6. because you didn't remember what day it was on? Went to work an hour late when
  7. you forgot to reset your clock for Daylight Savings Time? If this has happened
  8. to you, Cal may be able to help!
  9.  
  10. Cal is a calendar program with a difference - it lets you attach 'events' to
  11. any day of the year, either by date or according to a day's position in the
  12. month. When Cal loads, it reads the current date from your system clock and
  13. checks to see if any events are scheduled for the day. If so, Cal displays an
  14. alert that shows you the day's events. (When Cal loads as an ACC, it dings the
  15. system bell if an event is scheduled.)
  16.  
  17. Also included in this ARC file is CalShow, an AUTO program that will read the
  18. events from Cal, display the next 22 events on screen, then pause so you can
  19. easily see what's on tap for the next couple weeks. This should give you plenty
  20. of time to plan for upcoming events! See the separate CalShow doc file for more
  21. information.
  22.  
  23. Cal comes ready to go, pre-configured with seven dozen commonplace and
  24. obscure events. To use Cal, either install it as a desk accessory in the normal
  25. fashion, or just run it as a program. Cal uses around 36K of memory, and runs
  26. on any ST or TT in any resolution.
  27.  
  28.  
  29. * The main screen: looking at a specific month and year
  30.  
  31.  
  32. Most of the main screen is taken up with the calendar display. There are
  33. twelve small buttons under this display that allow you to see the calendar of
  34. any month in the year; just click the appropriate button. If you double-click
  35. one of these buttons, the calendar display will change to that month of the
  36. current year.
  37.  
  38. To the right of the calendar is a box that tells which month and year the
  39. calendar is showing. The six buttons under this box let you skip forward and
  40. back in one, ten, or hundred-year increments. (You can double-click on the
  41. hundreds buttons to move a thousand years at a time.) Also, if you click on the
  42. year number you can enter a specific year for Cal to display.
  43.  
  44. Underneath the six year buttons are two small words, PREV and NEXT. You can
  45. click on these words to move forward or back one month at a time. The display
  46. will wrap around the end of a year; for example, if you are looking at December
  47. and click NEXT, you'll see January of the following year.
  48.  
  49. Three large buttons appear at the bottom of the main screen. If you click the
  50. Today button while looking at the current month, Cal will display today's Day
  51. Alert, showing you the day of the year and any events scheduled for today. If
  52. you're looking at a different month when you click Today, Cal will simply
  53. display the current month. The Browse button will take you to the Browse dialog
  54. (see below for more information on browsing events). To exit Cal, click the
  55. Exit button or simply hit Return.
  56.  
  57.  
  58. * Different types of days
  59.  
  60.  
  61. The days in the calendar display come in four varieties. If Cal is showing
  62. the calendar of the current month and year, then today's date will be
  63. outlined. Days which are highlighted (i.e., white numbers on a black
  64. background) indicate that special events are scheduled on those days. Normal
  65. black-on-white numbers are simply days of the month which do not have events
  66. attached. Days in the preceding and following months are grayed out.
  67.  
  68.  
  69. * Looking at a specific day and its events
  70.  
  71.  
  72. To look at a specific day more closely, simply click on its date in the
  73. calendar. This brings up the Day Alert screen. The top of this screen displays
  74. the day of the week and the date, the day of the year, and how many days are
  75. left in the year. Underneath this is a box which tells you of any events
  76. scheduled on the day. Up to four messages can appear in this box. If there are
  77. more than four events scheduled for the day, you can click the button labelled
  78. "next page" to see the next group of four events. The list of events 'wraps
  79. around' at the end. For example, if you have six events for one day, the first
  80. four are shown first. Click "next page" and Cal will show you the fifth and
  81. sixth events, plus the first two.
  82.  
  83. Note: Cal will display at most 50 events for a single day, only 45 of which
  84. can be date events. If you find that this is too limiting, split your events
  85. between two copies of Cal.
  86.  
  87. To change one of the day's events (or add a new event for the day), simply
  88. click directly on the text of a message. If you do so, you'll move to the Edit
  89. dialog with that particular event selected. (See the next section for more
  90. information on editing events.)
  91.  
  92. You can click the Exit button (or hit Return) to return to the main calendar
  93. display from the Day Alert.
  94.  
  95.  
  96. * Entering, editing, and deleting events
  97.  
  98.  
  99. The Edit dialog allows you to edit existing events or enter new events. This
  100. dialog has two separate 'modes' - you may edit events either By Date or By
  101. Position. The two large buttons at the top of the screen let you switch between
  102. these two modes. The only difference between the two is that in Date mode, you
  103. see a space where you can enter a specific day of the month and year, but in
  104. Position mode you see two rows of buttons that let you specify a particular
  105. position in the month (e.g., the fourth Thursday). Both modes include buttons
  106. for you to select a particular month, a space for you to enter a message for an
  107. event, and a number of action buttons across the bottom of the screen.
  108.  
  109. There are two ways to get to the Edit dialog: you can click on the text of a
  110. message from the Day Alert, or you can click the Edit button from the Browse
  111. dialog (more on that later). If you enter the Edit dialog by selecting a date
  112. event, you start out in Date mode; if you select a positional event instead,
  113. then you start in Position mode. In any case, the Edit dialog is preset to the
  114. day you were looking at.
  115.  
  116. To add a new event, first indicate when the event occurs by selecting a month
  117. and entering a date or selecting a position. Then click the By Date or By
  118. Position button at the top of the screen to have Cal update the display. Cal
  119. will look at the date or position you entered and cycle through all the events
  120. scheduled for that day. This step is especially important before you erase or
  121. replace an event; if you select a different month or day, always let Cal know
  122. by clicking one of these buttons, or you may erase or replace the wrong event!
  123.  
  124. After you've selected the right schedule, you can add a new event by typing
  125. in a message. When you're done, click the Add button to store your event in
  126. memory. To _replace_ an event with a new message, click the Replace button
  127. (marked "repl") instead.
  128.  
  129. If you are in Date mode, you can tell Cal that an event will only occur once
  130. by typing a year in the space provided. This can be handy for remembering a
  131. meeting, dentist appointment, or other similar event. Once the event has
  132. expired (i.e., when the event's date has passed), Cal will automatically erase
  133. the event for you. (You can also configure Cal to ask you before it erases an
  134. expired event, or to do nothing to expired events - see the section about
  135. One-Time events below.) If you define a one-time event, it will only show up on
  136. the Day Alert when you're looking at that specific year. (All events, including
  137. one-time events, will still show up when you browse.)
  138.  
  139. If you want to erase an event, click the Erase button at the bottom of the
  140. screen. This brings up a dialog that lets you erase the event you're editing,
  141. all events in that month, or all the events stored in Cal. Select the
  142. appropriate button, then click the Erase Events button, or the Cancel button if
  143. you change your mind. If you choose to erase all events or an entire month's
  144. events, you'll be asked to verify your decision before the events are erased.
  145.  
  146. When you've finished editing the events, click the Save button at the bottom
  147. of the screen - this gives you a chance to locate the Cal program file and save
  148. your changes. When you've finished saving, click the Exit button (or hit
  149. Return) to exit the Edit dialog. (If you prefer, you don't have to save your
  150. changes as soon as you finish editing events. If you make any changes to events
  151. or to your Cal setup, then try to exit Cal without having saved the changes,
  152. you'll see an alert giving you the chance to "save, resume, or exit". Select
  153. "save" if you want to store your changes into Cal, "exit" if you want to exit
  154. Cal without saving the changes you made, or "resume"  to return to the main
  155. calendar screen.)
  156.  
  157. Note: if you upgrade to a newer version of Cal, you WON'T need to type in all
  158. your events again! Simply run your old version of Cal, go to the Edit screen,
  159. and select Save. When the file selector comes up, select the new version of Cal
  160. and save your events. Side note: one of the items Cal saves is the title bar
  161. and Desk menu entry... this means that when you run the new copy of Cal, the
  162. old title bar will show up. Unless you've customized your title, you may want
  163. to update the title to show the new version number; see the section below on
  164. customizing Cal for information on how to do this.
  165.  
  166.  
  167. * Browsing through the events
  168.  
  169.  
  170. To inspect all the events stored in Cal, click the Browse button from the
  171. main calendar screen. This will take you to the Browse dialog, where you can
  172. look through your events starting with the month shown on the calendar screen.
  173. Events are displayed in chronological order, with all the positional events for
  174. a month shown before the date events. If a number of events are scheduled for
  175. the same day, they are shown in alphabetical order.
  176.  
  177. The top of the Browse dialog tells you how many of each type of event there
  178. are and the total number of events. Under that is a box that lists which event
  179. you're looking at, whether it's a Date event, a one-time event, or a Positional
  180. event, and when the event occurs. The next box displays the message for the
  181. current event.
  182.  
  183. Under this display are two rows of buttons. Four of the buttons let you move
  184. through the events on file - First and Last take you to the beginning or end of
  185. the events, and Next and Previous move you forward or back one event at a time.
  186. You can double-click the Next and Previous buttons to move ten events at a
  187. time. Note: the Next button is the default button, so you can move ahead one
  188. event by simply hitting Return. To exit the Browse dialog, you must either
  189. click the EXIT button or hold down the Alternate key when you press Return.
  190.  
  191. The Find button gives you a chance to enter a character string and search
  192. through the events to find one which contains that string. The search starts at
  193. the event following the one you're browsing, wraps around to the beginning, and
  194. ends back at the current event if no match is found. By default, the search is
  195. not case-sensitive; if you want to change this, select the "case sensitive"
  196. button. You may also restrict the search to a particular type of event (i.e., a
  197. positional, one-time, or recurring event or some combination); to do so, select
  198. the appropriate buttons in the lower box.
  199.  
  200. The Erase button lets you remove the event you're currently browsing, one
  201. month's events, or all events. The Edit button takes you to the Edit dialog.
  202.  
  203.  
  204. * One-Time events
  205.  
  206.  
  207. When Cal starts up, it reads the current date from your system's clock. If
  208. you've scheduled a one-time event for a particular date and year, and Cal finds
  209. that that date has passed, it realizes that the event has 'expired'. When this
  210. occurs, Cal will display the Expired Event alert.
  211.  
  212. Cal shows you the event and asks if you want it erased or converted to a
  213. yearly event. Select the appropriate button, then click the Accept button.
  214. If you'd rather wait until later to decide, you can click Skip to move on to
  215. the next expired event. You can also click the Cancel button to skip over all
  216. expired events at once. Any expired events that you skip will still be waiting
  217. for you next time you start Cal.
  218.  
  219. If you prefer, you can have Cal automatically erase expired events without
  220. asking about each one, or do nothing when an event expires. To set this up, use
  221. the Preferences dialog to customize Cal's behaviour.
  222.  
  223. Note: when Cal erases expired events for you automatically, it sets a flag to
  224. show that your setup has changed. If you try to exit Cal without having saved
  225. your setup after this occurs, you'll see the alert telling you that you need to
  226. save the setup. If you see this alert but you haven't changed any events or
  227. preferences, don't be alarmed; it's due to expired events being erased.
  228.  
  229.  
  230. * Preferences: Customizing Cal
  231.  
  232.  
  233. You have the option of customizing several aspects of Cal's behaviour. You
  234. can specify the Desk menu entry Cal will use when running as an accessory,
  235. change how Cal handles expired events, and decide whether or not Cal draws
  236. grow/shrink boxes or displays alerts when you add, replace, or erase events.
  237.  
  238. To change any of these items, click on the large title bar at the top of the
  239. main calendar screen. When the dialog appears, select the radio buttons for
  240. the features you want activated. If you wish, type in a new Desk menu entry.
  241. When you finish selecting your preferences, click the "accept" button or just
  242. hit Return. If you decide not to make any changes, click the "cancel" button
  243. to return to the main screen.
  244.  
  245. After you change any of these settings, be sure to save your new setup,
  246. either from the Edit dialog or when exiting the program.
  247.  
  248.  
  249. * Technical stuff
  250.  
  251.  
  252. CalShow can provide a simple printout of upcoming events, but there is
  253. currently no way to print out a pretty, formatted list. In case someone wants
  254. to write such a program, I'm providing the format of Cal's event database. The
  255. following data is stored in Cal, starting at an offset of $36 bytes from the
  256. beginning of the file...
  257.  
  258.     4 bytes     "ca31"  identifier, shows this is Cal
  259.     1 long       6000   the current amount of space for event storage
  260.     14 bytes     ...    the last filename used when saving data
  261.     1 word       ...    the offset from the start of the message area
  262.                           to the beginning of the unused part
  263.     6000 bytes   ...    the message area itself (see below)
  264.     6 bytes      ...    reserved; flags, etc.
  265.     18 bytes     ...    the current title bar/Desk menu entry
  266.  
  267. Each event is stored in the message area, and has this format:
  268.  
  269.       offset 0   word   offset to next event entry
  270.       offset 2   byte   event date (1..31) or zero if a positional event
  271.       offset 3   byte   month of event (1..12)
  272.       offset 4   byte   week position (0-4=weeks 1-5, 5=last, 6=each)
  273.       offset 5   byte   weekday (0=Sunday, 1=Monday ... 6=Saturday)
  274.   OR: offset 4   word   year for a one-time date event
  275.       offset 6   ....   the actual message, a null-terminated string
  276.  
  277. If anyone decides to write a pretty-print program for upcoming events, please
  278. let me know!
  279.  
  280.  
  281. * Credits and a postcardware plea
  282.  
  283.  
  284. Cal and CalShow were written completely in assembly language using the HiSoft
  285. DevpacST assembler. Cal's resource was created with WERCS, and converted to
  286. assembly code using a program written by Carl Barron. Many thanks go to Robert
  287. Birmingham, Keith Joins, Jimmy Long, Jim Ness, Rob Rasmussen, Ray Mattera, Bob
  288. Schulze, Jody Golick, Thomas Miller, and Phil Vaughan for beta testing and some
  289. great suggestions!
  290.  
  291. The calendar routine I use in Cal was based on Zeller's Congruence, which
  292. explains a simple way to calculate the day of the week for a given date without
  293. resorting to a lookup table. Articles dealing with this subject appeared in
  294. Computer Language Magazine, March and December 1988. (The articles were
  295. helpful, although they included a couple of typographical errors. :-) Also note
  296. that the modern calendar wasn't invented until the 1580s, something to keep in
  297. mind if you're poking around in the dim and distant past <grin>.
  298.  
  299. Please let me know if you use this program!!! Comments, bug reports,
  300. suggestions, and requests are all welcome. If you need a version of Cal with
  301. more storage room for events, I'd be glad to assemble one for you. Donations
  302. are gratefully accepted - but even if you don't want to contribute, please
  303. send me a postcard at the address below!
  304.  
  305.  
  306.       Bill Aycock
  307.       2310 North Elm Street
  308.       Greensboro, NC 27408
  309.  
  310.       Compuserve ID: 76703,4061
  311.       February 17, 1991
  312.  
  313. -------------------------------
  314. version history:
  315. v4.5: added multiple positional events; when saving setup, file selector now
  316.       defaults to path Cal loaded from; allow more events on single day; added
  317.       code to help guard against unusual March start date problem
  318. v4.4: added option to supress add/replace/erase event alerts; added case
  319.       sensitive search, retains search string between searches
  320. v4.3: fixed a logic bug occurring when exiting Cal in some circumstances;
  321.       added keyboard exit from Browse screen
  322. v4.2: added Replace button in Edit; added option to ignore expired events;
  323.       added type filters to Find function; changed Browse logic
  324. v4.1: added grow/shrink box support; added leap-year check for one-time
  325.       events on Feb 29; skip saving duplicate events; sundry other tweaks
  326. v4.0: added multiple events on the same date; added alphabetic sort; added
  327.       one-time events and expired-event handling; various other tweaks
  328. v3.5: fixed filepath setup for standard GEM file selector problem
  329. v3.4: fixed logic error in CalShow; enabled 'last' week position button
  330. v3.3: fixed obscure bug in Find function; redesigned Browse screen and Today
  331.       button logic; added Prev and Next month buttons; added option to save
  332.       changed setup when exiting
  333. v3.2: fixed occasional bus errors after erasing events and then browsing;
  334.       included CalShow for bootup reminders
  335. v3.1: first released version supporting events
  336. v2.0: final calendar-only version
  337.